package com.heima.admin.controller.v1;

import com.heima.admin.service.AdUserLoginService;
import com.heima.admin.service.AdUserService;
import com.heima.model.admin.adminDto.AdUserDto;
import com.heima.model.common.dtos.ResponseResult;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * @author shitou
 * @className AdAdminLoginController
 * @description: 平台管理登录
 */
@RestController
@Slf4j
@RequestMapping("/login")
public class AdAdminLoginController {
    @Resource
    private AdUserService adUserService;

    /**
     * 用户登录
     *
     * @param dto
     * @return
     */
    @PostMapping("/in")
    public ResponseResult adminLogin(@RequestBody AdUserDto dto) {
        return adUserService.adminLogin(dto);
    }

}
